const http = uni.$u.http;

// post请求，获取菜单
export const postMenu = (params, config = {}) =>
  http.post("/ebapi/public_api/index", params, config);

// get请求，获取菜单，注意：get请求的配置等，都在第二个参数中，详见前面解释
// export const getMenu = () => http.get("/categories");
//获取分类
export function getMenu(data) {
  return http.post("/index/firstSecondClassification.json", data);
}

//获取商品详情
export function getGoodsDetail(data) {
  return http.post("/index/goodsDetail.json", data);
}

//获取商品详情
export function getorderList(data) {
  return http.post("/order/orderList.json", data);
}

//获取订单详情
export function getorderDetal(data) {
  return http.post(
    "/order/orderDetail.json?orderId=50582&sessionId=c22eeb72a2abdc87a2e8b2c6865",
    data
  );
}

//归还商品
export function getorderGui(data) {
  return http.post(
    "/order/orderDetail.json?orderId=50583&sessionId=c22eeb72a2abdc87a2e8b2c6865",
    data
  );
}

//续租商品
export function getorderXu(data) {
  return http.post(
    "/order/orderDetail.json?orderId=49853&sessionId=c22eeb72a2abdc87a2e8b2c6865d230d_61985",
    data
  );
}

//获取订单详情
export function getgoodsMark(data) {
  return http.post(
    "/order/orderDetail.json?orderId=50614&sessionId=c22eeb72a2abdc87a2e8b2c6865",
    data
  );
}

//获取订单详情
export function getActionList(data) {
  return http.post(
    "/order/orderList.json?sessionId=c22eeb72a2abdc87a2e8b2c6865d230d_61985",
    data
  );
}

//我的优惠券
export function getmyQuanList(data) {
  return http.post(
    "/user/myCouponList.json?sessionId=c22eeb72a2abdc87a2e8b2c6865d230d_61985",
    data
  );
}

//领取优惠券列表
export function getCouponList(data) {
  return http.post(
    "/index/couponList.json?sessionId=c22eeb72a2abdc87a2e8b2c6865d230d_61985",
    data
  );
}

// 领取优惠券
export function getReceiveCoupon(data) {
  return http.post(
    "/index/receiveCoupon.json?sessionId=c22eeb72a2abdc87a2e8b2c6865d230d_61985",
    data
  );
}
